#include <iostream>
#include "double_link_list.h"

template <class type>
void dump(double_link_list<type> l)
{
	std::cout << "list size = " << l.size() << std::endl;
	if(l.size() > 0)
	{
		std::cout << "list elements = [";

		for(int i = 0; i < l.size(); ++i)
		{
			if(i == 0)
			{
				std::cout << l[i];
			}
			else
			{
				std::cout << "," << l[i];
			}
		}

		std::cout << "]" << std::endl;
	}
}

void main()
{
	double_link_list<int> l;
	l.add(2);
	dump(l);

	l.insert(0, 3);
	dump(l);

	l.insert(2, 4);
	dump(l);

	l.remove(2);
	dump(l);
}